/*************************************************************************
 *************************************************************************
 	 	 	 	 	 	 	M2SMA : COMMON_LIBS.h
 *************************************************************************
 *
 	 Copyright (C) 2011
 	 TODO, Steven Costiou, France
 *
 **************************************************************************
 **************************************************************************
 *
	Common includes to externals libraries.
	Every core class shall include this file.

	Needed installs :
	-----------------

		- Log4Cpp : http://log4cpp.sourceforge.net/
 *
 **************************************************************************
 **************************************************************************
 *
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/
 *
 **************************************************************************
 **************************************************************************/

#ifndef TRACE_INTERFACES_H_
#define TRACE_INTERFACES_H_

#define LOGGING_ACTIVE true

#ifdef LOGGING_ACTIVE
	//#define LOG_DIRECTORY "/home/rstv/"
	#include "Logger.h"
	Logger* logInterface = new Logger();
	#define TRC_EVT(aPriority, anEvent) (logInterface->TRACE_EVENT(aPriority, anEvent))
#else
	#include <log4cpp/Priority.hh>
	#define TRC_EVT(aPriority, anEvent)
#endif

#ifdef LOGGING_ACTIVE
	#define CLEAN_TRC_OBJECTS() (delete logInterface;)
#else
	#define CLEAN_TRC_OBJECTS()
#endif

#endif /* TRACE_INTERFACES_H_ */
